<?php /* Smarty version Smarty-3.0.8, created on 2012-10-27 07:13:30
         compiled from "G:\xampp\htdocs\gy78/template\admin/post_index.html" */ ?>
<?php /*%%SmartyHeaderCode:13379508b191a155f49-63290545%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'ee6efd5c906492d5e702d7e57a5fdabcd6bd48b7' => 
    array (
      0 => 'G:\\xampp\\htdocs\\gy78/template\\admin/post_index.html',
      1 => 1351293207,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '13379508b191a155f49-63290545',
  'function' => 
  array (
  ),
  'has_nocache_code' => false,
)); /*/%%SmartyHeaderCode%%*/?>
<?php $_template = new Smarty_Internal_Template("admin/header.html", $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
 echo $_template->getRenderedTemplate(); $_template->rendered_content = null;?><?php unset($_template);?>

			<ul id="main-nav">  <!-- Accordion Menu -->

				<li>
					<a href="<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['spUrl'][0][0]->__template_spUrl(array('c'=>'admin','a'=>'index'),$_smarty_tpl);?>
" class="nav-top-item no-submenu">控制面板</a>
				</li>

				<li>
					<a href="#" class="nav-top-item current">文章</a>
					<ul>
						<li><a href="<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['spUrl'][0][0]->__template_spUrl(array('c'=>'post','a'=>'write'),$_smarty_tpl);?>
">撰写新文章</a></li>
						<li><a class="current" href="<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['spUrl'][0][0]->__template_spUrl(array('c'=>'post','a'=>'index'),$_smarty_tpl);?>
">文章管理</a></li>
						<li><a href="<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['spUrl'][0][0]->__template_spUrl(array('c'=>'category','a'=>'index'),$_smarty_tpl);?>
">分类管理</a></li>
					</ul>
				</li>

				<li>
					<a href="#" class="nav-top-item">页面和区块</a>
					<ul>
						<li><a href="<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['spUrl'][0][0]->__template_spUrl(array('c'=>'page','a'=>'write'),$_smarty_tpl);?>
">撰写新页面</a></li>
                        <li><a href="<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['spUrl'][0][0]->__template_spUrl(array('c'=>'area','a'=>'write'),$_smarty_tpl);?>
">撰写新区块</a></li>
						<li><a href="<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['spUrl'][0][0]->__template_spUrl(array('c'=>'page','a'=>'index'),$_smarty_tpl);?>
">页面管理</a></li>
						<li><a href="<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['spUrl'][0][0]->__template_spUrl(array('c'=>'area','a'=>'index'),$_smarty_tpl);?>
">区块管理</a></li>
					</ul>
				</li>

				<li>
					<a href="#" class="nav-top-item">设置</a>
					<ul>
						<li><a href="<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['spUrl'][0][0]->__template_spUrl(array('c'=>'user','a'=>'edit','uid'=>$_SESSION['userinfo']['uid']),$_smarty_tpl);?>
">个人信息</a></li>
						<li><a href="<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['spUrl'][0][0]->__template_spUrl(array('c'=>'user','a'=>'index'),$_smarty_tpl);?>
">用户和权限</a></li>
					</ul>
				</li>

			</ul> <!-- End #main-nav -->

		</div></div> <!-- End #sidebar -->

		<div id="main-content"> <!-- Main Content Section with everything -->

			<div class="content-box"><!-- Start Content Box -->

				<div class="content-box-header">

					<h3>文章列表</h3>

				</div> <!-- End .content-box-header -->

				<div class="content-box-content">
				<form id="form1" name="form1" method="get" action="<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['spUrl'][0][0]->__template_spUrl(array('c'=>'post','a'=>'del'),$_smarty_tpl);?>
">
				  <table>

							<thead>
								<tr>
								   <th>ID</th>
	<th>标题</th>
	<th>浏览</th>
	<th>显示</th>
	<th>推荐</th>
	<th>公开</th>
	<th>作者</th>
	<th>操作</th>
	</tr>

	</thead>

							<tfoot>
								<tr>
									<td colspan="7">

										<div class="pagination">
										<?php if ($_smarty_tpl->getVariable('pager')->value){?>
										<?php if ($_smarty_tpl->getVariable('pager')->value['current_page']!=$_smarty_tpl->getVariable('pager')->value['first_page']){?>
											<a href="<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['spUrl'][0][0]->__template_spUrl(array('c'=>'post','a'=>'posts','page'=>$_smarty_tpl->getVariable('pager')->value['first_page']),$_smarty_tpl);?>
">&laquo; 前页</a> |
											<a href="<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['spUrl'][0][0]->__template_spUrl(array('c'=>'post','a'=>'posts','page'=>$_smarty_tpl->getVariable('pager')->value['prev_page']),$_smarty_tpl);?>
">&laquo; 上一页</a> |
											<?php }?>
											<!--开始循环页码，同时如果循环到当前页则不显示链接-->
											<?php  $_smarty_tpl->tpl_vars['thepage'] = new Smarty_Variable;
 $_from = $_smarty_tpl->getVariable('pager')->value['all_pages']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if ($_smarty_tpl->_count($_from) > 0){
    foreach ($_from as $_smarty_tpl->tpl_vars['thepage']->key => $_smarty_tpl->tpl_vars['thepage']->value){
?>
											<?php if ($_smarty_tpl->tpl_vars['thepage']->value!=$_smarty_tpl->getVariable('pager')->value['current_page']){?>
											<a class="number" href="<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['spUrl'][0][0]->__template_spUrl(array('c'=>'post','a'=>'posts','page'=>$_smarty_tpl->tpl_vars['thepage']->value),$_smarty_tpl);?>
"><?php echo $_smarty_tpl->tpl_vars['thepage']->value;?>
</a>
											<?php }else{ ?>
											<b class="number current"><?php echo $_smarty_tpl->tpl_vars['thepage']->value;?>
</b>
											<?php }?>
											<?php }} ?>
											<!--在当前页不是最后一页的时候，显示下一页和后页-->
											<?php if ($_smarty_tpl->getVariable('pager')->value['current_page']!=$_smarty_tpl->getVariable('pager')->value['last_page']){?> |
											<a href="<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['spUrl'][0][0]->__template_spUrl(array('c'=>'post','a'=>'posts','page'=>$_smarty_tpl->getVariable('pager')->value['next_page']),$_smarty_tpl);?>
">下一页 &raquo;</a> |
											<a href="<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['spUrl'][0][0]->__template_spUrl(array('c'=>'post','a'=>'posts','page'=>$_smarty_tpl->getVariable('pager')->value['last_page']),$_smarty_tpl);?>
">后页 &raquo;</a>
											<?php }?>
											<?php }?>

										</div> <!-- End .pagination -->
										<div class="clear"></div>
									</td>
								</tr>
							</tfoot>

							<tbody>
							<?php if ($_smarty_tpl->getVariable('results')->value==''){?>
							<tr>
								<td><center><font color="red">没有找到您要的文章！</font></center></td>
							</tr>
							<?php }else{ ?>
								<?php  $_smarty_tpl->tpl_vars['one'] = new Smarty_Variable;
 $_from = $_smarty_tpl->getVariable('results')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if ($_smarty_tpl->_count($_from) > 0){
    foreach ($_from as $_smarty_tpl->tpl_vars['one']->key => $_smarty_tpl->tpl_vars['one']->value){
?>
								<tr>
									<td><?php echo $_smarty_tpl->tpl_vars['one']->value['id'];?>
</td>
									<td><!--循环显示分类-->
									[<?php  $_smarty_tpl->tpl_vars['result'] = new Smarty_Variable;
 $_from = $_smarty_tpl->getVariable('select')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if ($_smarty_tpl->_count($_from) > 0){
    foreach ($_from as $_smarty_tpl->tpl_vars['result']->key => $_smarty_tpl->tpl_vars['result']->value){
?>
										  <a href="<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['spUrl'][0][0]->__template_spUrl(array('c'=>'post','a'=>'cate','id'=>$_smarty_tpl->tpl_vars['result']->value['id']),$_smarty_tpl);?>
"><?php if ($_smarty_tpl->tpl_vars['one']->value['parent']==$_smarty_tpl->tpl_vars['result']->value['id']){?><?php echo $_smarty_tpl->tpl_vars['result']->value['name'];?>
<?php }?></a>
									<?php }} ?>]
									<a href="<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['spUrl'][0][0]->__template_spUrl(array('c'=>'post','a'=>'edit','id'=>$_smarty_tpl->tpl_vars['one']->value['id']),$_smarty_tpl);?>
"><?php echo $_smarty_tpl->tpl_vars['one']->value['title'];?>
</a>
									</td>
									<td><a href="<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['spUrl'][0][0]->__template_spUrl(array('c'=>'main','a'=>'article','slug'=>$_smarty_tpl->tpl_vars['one']->value['slug']),$_smarty_tpl);?>
"><?php echo $_smarty_tpl->tpl_vars['one']->value['count'];?>
</a></td>
									<td><?php if ($_smarty_tpl->tpl_vars['one']->value['status']=="1"){?><font color='red'>隐藏</font><?php }else{ ?>显示<?php }?></td>
									<td><?php if ($_smarty_tpl->tpl_vars['one']->value['allowCommend']=="1"){?><font color='red'>推荐</font><?php }else{ ?>正常<?php }?></td>
									<td><?php if ($_smarty_tpl->tpl_vars['one']->value['public']=="1"){?><font color='red'>公开</font><?php }else{ ?>受限<?php }?></td>
									<td><?php echo $_smarty_tpl->tpl_vars['one']->value['author'];?>
</td>
									<td>
										<!-- Icons -->
										 <a href="<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['spUrl'][0][0]->__template_spUrl(array('c'=>'post','a'=>'edit','id'=>$_smarty_tpl->tpl_vars['one']->value['id']),$_smarty_tpl);?>
" title="Edit"><img src="/resources/images/icons/pencil.png" alt="Edit" /></a>
										 <a href="javascript:void(0);" onclick="delconfirm(<?php echo $_smarty_tpl->tpl_vars['one']->value['id'];?>
,'<?php echo $_smarty_tpl->tpl_vars['one']->value['title'];?>
');" title="Delete"><img src="/resources/images/icons/cross.png" alt="Delete" /></a>
									</td>
								</tr>
								<?php }} ?>
								<?php }?>
								<tr>

								</tr>


							</tbody>

						</table>
						</form>
				</div> <!-- End .content-box-content -->

			</div> <!-- End .content-box --><!-- End .content-box --><!-- End .content-box -->
	    <div class="clear"></div>
<?php $_template = new Smarty_Internal_Template("admin/footer.html", $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
 echo $_template->getRenderedTemplate(); $_template->rendered_content = null;?><?php unset($_template);?>
<script>
function delconfirm(id,title){
	if( window.confirm("确定删除“" + title + "”？") ){
		window.location = "<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['spUrl'][0][0]->__template_spUrl(array('c'=>'post','a'=>'del'),$_smarty_tpl);?>
&id=" + id;
	}
}
</script>